/** <a href="http://www.cpupk.com/decompiler">Eclipse Class Decompiler</a> plugin, Copyright (c) 2017 Chen Chao. **/
package com.minierp.controller;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.minierp.bean.UserBean;
import com.minierp.bean.UserStatus;
import com.minierp.dao.BankAccountDao;
import com.minierp.dao.EnterpriseInfoDao;
import com.minierp.dao.IdGenerator;
import com.minierp.dao.PrivilegeDao;
import com.minierp.dao.StafferDao;
import com.minierp.dao.TallySetDao;
import com.minierp.dao.UserDao;
import com.minierp.dao.UserPoDao;
import com.minierp.dao.UserPrivilegeDao;
import com.minierp.dao.WorkCenterDao;
import com.minierp.err.PermissionDennyException;
import com.minierp.helper.EncCommonHelper;
import com.minierp.helper.EncInterceptorHelper;
import com.minierp.helper.EncLoginFormCtrHelper;
import com.minierp.helper.PageHelper;
import com.minierp.model.EnterpriseInfo;
import com.minierp.model.Privilege;
import com.minierp.model.Staffer;
import com.minierp.model.User;
import com.minierp.model.UserPo;
import com.minierp.model.UserPrivilege;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

public class UserMACtr extends MultiActionController {
	private UserDao userDao;
	private PrivilegeDao privilegeDao;
	private UserPrivilegeDao userPrivilegeDao;
	private TallySetDao tallySetDao;
	private WorkCenterDao workCenterDao;
	private BankAccountDao bankAccountDao;
	private UserPoDao userPoDao;
	private StafferDao stafferDao;
	private EnterpriseInfoDao enterpriseInfoDao;
	private IdGenerator idGenerator;
	private DataSource dataSource;
	private String mainView;
	private String listView;
	private String privilegeListView;
	private String operateSuccessView;
	private String listForMultiSelectView;
	private String tsSelectView;
	private String listForSelectView;
	private String priSetTypeSelectView;

	public BankAccountDao getBankAccountDao() {
		return this.bankAccountDao;
	}

	public void setBankAccountDao(BankAccountDao bankAccountDao) {
		this.bankAccountDao = bankAccountDao;
	}

	public UserPoDao getUserPoDao() {
		return this.userPoDao;
	}

	public void setUserPoDao(UserPoDao userPoDao) {
		this.userPoDao = userPoDao;
	}

	public String getPriSetTypeSelectView() {
		return this.priSetTypeSelectView;
	}

	public void setPriSetTypeSelectView(String priSetTypeSelectView) {
		this.priSetTypeSelectView = priSetTypeSelectView;
	}

	public String getListForSelectView() {
		return this.listForSelectView;
	}

	public void setListForSelectView(String listForSelectView) {
		this.listForSelectView = listForSelectView;
	}

	public String getTsSelectView() {
		return this.tsSelectView;
	}

	public void setTsSelectView(String tsSelectView) {
		this.tsSelectView = tsSelectView;
	}

	public ModelAndView handleMain(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "SYST_USER")) {
			throw new Exception("Permission deny!");
		} else {
			ModelAndView mv = new ModelAndView(this.mainView);
			return mv;
		}
	}

	public ModelAndView handleList(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "SYST_USER")) {
			throw new PermissionDennyException("Permission denny!");
		} else {
			ModelAndView mv = new ModelAndView(this.listView);
			List list = this.userDao.getList(false, false, "", "USER_NAME");
			ArrayList arr = new ArrayList();
			ArrayList timeoutArr = new ArrayList();
			ArrayList unenabledArr = new ArrayList();
			Date now = new Date();

			for (int i = 0; i < list.size(); ++i) {
				Object[] objs = (Object[]) list.get(i);
				Date validity = (Date) objs[4];
				if (validity != null && validity.before(now)) {
					objs[6] = "Y";
				} else {
					objs[6] = "N";
				}

				if (objs[5].toString().equals("N")) {
					unenabledArr.add(objs);
				} else if (objs[6].toString().equals("Y")) {
					timeoutArr.add(objs);
				} else {
					arr.add(objs);
				}
			}

			arr.addAll(timeoutArr);
			arr.addAll(unenabledArr);
			mv.addObject("userList", arr);
			return mv;
		}
	}

	public ModelAndView handlePrivilegeList(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "SYST_USER")) {
			throw new Exception("Permission deny!");
		} else {
			ModelAndView mv = new ModelAndView(this.privilegeListView);
			String userId = request.getParameter("user_id");
			String templateId = request.getParameter("template_id");
			User user = (User) this.userDao.get(User.class,
					Long.parseLong(userId));
			List list = this.privilegeDao.getList();
			List tsList = this.tallySetDao.getList(true);
			EnterpriseInfo en = EncCommonHelper.getEnterpriseInfo(request);
			UserBean ub = new UserBean();
			if (user != null) {
				ub.setUser(user);
				List gList;
				List pList;
				if (templateId != null && !templateId.equals("")) {
					gList = this.userPrivilegeDao.getList(Long
							.parseLong(templateId));
					pList = this.userPoDao.getList(Long.parseLong(templateId));
				} else {
					gList = this.userPrivilegeDao.getList(user.getId());
					pList = this.userPoDao.getList(user.getId());
				}

				EncCommonHelper.setUserPrivilegeInfo(ub, en, gList, pList);
			}

			ArrayList arg14 = new ArrayList();
			ArrayList arg15 = new ArrayList();

			for (int i = 0; i < list.size(); ++i) {
				Privilege p = (Privilege) list.get(i);
				if (p.getParentId() == 0L) {
					arg14.add(p);
				} else {
					arg15.add(p);
				}
			}

			mv.addObject("privList", arg15);
			mv.addObject("grouList", arg14);
			mv.addObject("tallySetList", tsList);
			if (en.getWorkCenter().equals("Y")) {
				mv.addObject("workCenterList", this.workCenterDao.getList(true));
			}

			if (en.getBankPr().equals("Y")) {
				mv.addObject("baList", this.bankAccountDao.getList("Y", "Y"));
			}

			mv.addObject("ub", ub);
			mv.addObject("userId", userId);
			return mv;
		}
	}

	public ModelAndView handlePrivilegeSet(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		if (!EncCommonHelper.checkPrivilege(request, "SYST_USER")) {
			throw new Exception("Permission deny!");
		} else {
			String userId = request.getParameter("user_id");
			String str = request.getParameter("privilege_str");
			String tsStr = request.getParameter("ts_privilege_str");
			String wcStr = request.getParameter("wc_privilege_str");
			String baStr = request.getParameter("ba_privilege_str");
			String[] priArr = str.split(";");
			String[] tsArr = tsStr.split(";");
			List upList = this.userPrivilegeDao.getList(Long.parseLong(userId));
			List uPoList = this.userPoDao.getList(Long.parseLong(userId));
			EnterpriseInfo en = EncCommonHelper.getEnterpriseInfo(request);

			UserPrivilege up;
			int upo;
			for (upo = 0; upo < upList.size(); ++upo) {
				up = (UserPrivilege) upList.get(upo);
				if (str.indexOf(";" + up.getPrivilegeCode() + ";") == -1) {
					this.userPrivilegeDao.delete(up.getId());
				}
			}

			int i;
			for (upo = 0; upo < priArr.length; ++upo) {
				if (priArr[upo] != null && !priArr[upo].equals("")) {
					boolean mv = false;

					for (i = 0; i < upList.size(); ++i) {
						up = (UserPrivilege) upList.get(i);
						if (up.getPrivilegeCode().equals(priArr[upo])) {
							mv = true;
							break;
						}
					}

					if (!mv) {
						up = new UserPrivilege();
						up.setId(this.idGenerator.getId(UserPrivilege.class
								.getName()));
						up.setPrivilegeCode(priArr[upo]);
						up.setUserId(Long.parseLong(userId));
						this.userPrivilegeDao.save(up);
					}
				}
			}

			UserPo arg18;
			int arg19;
			for (arg19 = 0; arg19 < uPoList.size(); ++arg19) {
				arg18 = (UserPo) uPoList.get(arg19);
				if (arg18.getPoType().equals("TS")
						&& tsStr.indexOf(";" + arg18.getPoId() + ";") == -1) {
					this.userPoDao.delete(arg18.getId());
				} else if (!arg18.getPoType().equals("WC")
						|| !en.getWorkCenter().equals("N")
						&& wcStr.indexOf(";" + arg18.getPoId() + ";") != -1) {
					if (arg18.getPoType().equals("BA")
							&& (en.getBankPr().equals("N") || baStr.indexOf(";"
									+ arg18.getPoId() + ";") == -1)) {
						this.userPoDao.delete(arg18.getId());
					}
				} else {
					this.userPoDao.delete(arg18.getId());
				}
			}

			for (arg19 = 0; arg19 < tsArr.length; ++arg19) {
				if (tsArr[arg19] != null && !tsArr[arg19].equals("")) {
					boolean arg20 = false;

					for (int found = 0; found < uPoList.size(); ++found) {
						arg18 = (UserPo) uPoList.get(found);
						if (arg18.getPoType().equals("TS")
								&& String.valueOf(arg18.getPoId()).equals(
										tsArr[arg19])) {
							arg20 = true;
							break;
						}
					}

					if (!arg20) {
						arg18 = new UserPo();
						arg18.setId(this.idGenerator.getId(UserPo.class
								.getName()));
						arg18.setPoId(Long.parseLong(tsArr[arg19]));
						arg18.setUserId(Long.parseLong(userId));
						arg18.setPoType("TS");
						this.userPoDao.save(arg18);
					}
				}
			}

			int j;
			String[] arg21;
			boolean arg22;
			if (en.getWorkCenter().equals("Y")) {
				arg21 = wcStr.split(";");

				for (i = 0; i < arg21.length; ++i) {
					if (arg21[i] != null && !arg21[i].equals("")) {
						arg22 = false;

						for (j = 0; j < uPoList.size(); ++j) {
							arg18 = (UserPo) uPoList.get(j);
							if (arg18.getPoType().equals("WC")
									&& String.valueOf(arg18.getPoId()).equals(
											arg21[i])) {
								arg22 = true;
								break;
							}
						}

						if (!arg22) {
							arg18 = new UserPo();
							arg18.setId(this.idGenerator.getId(UserPo.class
									.getName()));
							arg18.setPoId(Long.parseLong(arg21[i]));
							arg18.setUserId(Long.parseLong(userId));
							arg18.setPoType("WC");
							this.userPoDao.save(arg18);
						}
					}
				}
			}

			if (en.getBankPr().equals("Y")) {
				arg21 = baStr.split(";");

				for (i = 0; i < arg21.length; ++i) {
					if (arg21[i] != null && !arg21[i].equals("")) {
						arg22 = false;

						for (j = 0; j < uPoList.size(); ++j) {
							arg18 = (UserPo) uPoList.get(j);
							if (arg18.getPoType().equals("BA")
									&& String.valueOf(arg18.getPoId()).equals(
											arg21[i])) {
								arg22 = true;
								break;
							}
						}

						if (!arg22) {
							arg18 = new UserPo();
							arg18.setId(this.idGenerator.getId(UserPo.class
									.getName()));
							arg18.setPoId(Long.parseLong(arg21[i]));
							arg18.setUserId(Long.parseLong(userId));
							arg18.setPoType("BA");
							this.userPoDao.save(arg18);
						}
					}
				}
			}

			EncCommonHelper.setAlertMessage(request, "授权成功！用户在重新登录后生效。");
			ModelAndView arg23 = new ModelAndView(this.operateSuccessView);
			arg23.addObject("returnValue", String.valueOf(userId));
			return arg23;
		}
	}

	public ModelAndView handleDelete(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String returnUrl = request.getParameter("from_url");
		String id = request.getParameter("id");
		if (EncCommonHelper.checkPrivilege(request, "SYST_USER")
				&& Long.parseLong(id) != 1L) {
			this.userDao.delete(Long.parseLong(id));
			EncCommonHelper.setAlertMessage(request, "删除成功！");
			return new ModelAndView("redirect:" + returnUrl);
		} else {
			throw new Exception("Permission deny!");
		}
	}

	public ModelAndView handlePause(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String returnUrl = request.getParameter("from_url");
		String id = request.getParameter("id");
		String flag = request.getParameter("flag");
		if (EncCommonHelper.checkPrivilege(request, "SYST_USER")
				&& Long.parseLong(id) != 1L) {
			User u = (User) this.userDao.get(User.class, Long.parseLong(id));
			if (u != null) {
				u.setEnabled(flag);
				this.userDao.update(u);
			}

			EncCommonHelper.setAlertMessage(request, "设置成功！");
			return new ModelAndView("redirect:" + returnUrl);
		} else {
			throw new Exception("Permission deny!");
		}
	}

	public ModelAndView handleListForSelect(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String searchKey = request.getParameter("search_key");
		String type = request.getParameter("type");
		String includeAdmin = request.getParameter("include_admin");
		ModelAndView mv;
		if (type != null && type.equals("MULTI")) {
			mv = new ModelAndView(this.listForMultiSelectView);
		} else {
			mv = new ModelAndView(this.listForSelectView);
		}

		boolean needAdmin = false;
		if (includeAdmin != null && includeAdmin.equals("Y")) {
			needAdmin = true;
		}

		mv.addObject("userList",
				this.userDao.getList(true, needAdmin, searchKey, "DEP_NAME"));
		mv.addObject("searchKey", searchKey);
		mv.addObject("type", type);
		mv.addObject("includeAdmin", includeAdmin);
		return mv;
	}

	public ModelAndView handleTsChange(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		long tsId = Long.parseLong(request.getParameter("ts_id"));
		UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
		this.setUserDfTsId(tsId, ub);
		response.setContentType("text/plain");
		response.setCharacterEncoding("utf-8");
		response.setHeader("Cache-Control", "no-cache");
		response.setHeader("Pragma", "no-cache");
		ServletOutputStream out = response.getOutputStream();
		out.write(String.valueOf(tsId).getBytes());
		out.flush();
		out.close();
		return null;
	}

	public ModelAndView handleTsSelect(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String flag = request.getParameter("flag");
		ModelAndView mv;
		if (flag != null && flag.equals("1")) {
			UserBean ub = EncCommonHelper.getCurrentUserAccount(request);
			long tsId = Long.parseLong(request.getParameter("ts_id"));
			this.setUserDfTsId(tsId, ub);
			mv = new ModelAndView(this.operateSuccessView);
			String retVal = "";
			if (ub.getDfTsName() != null && !ub.getDfTsName().equals("")) {
				retVal = ub.getDfTsName();
			} else {
				retVal = "请选开单帐套";
			}

			mv.addObject("returnValue", retVal);
		} else {
			mv = new ModelAndView(this.tsSelectView);
		}

		return mv;
	}

	public ModelAndView handlePriSetTypeSelect(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView(this.priSetTypeSelectView);
		return mv;
	}

	private void setUserDfTsId(long tsId, UserBean ub) {
		User u = ub.getUser();
		boolean canUpdate = false;
		if (tsId == 0L) {
			ub.setDfTsName("");
			u.setDfTsId(tsId);
			canUpdate = true;
		} else {
			String tsName = EncCommonHelper.getSimpleObjectName(
					ub.getTallySets(), tsId);
			if (tsName != null && !tsName.equals("")) {
				ub.setDfTsName(tsName);
				u.setDfTsId(tsId);
				canUpdate = true;
			}
		}

		if (canUpdate) {
			this.userDao.update(u);
		}

		ub.setNeedTsSelect("N");
	}

	public ModelAndView handleAppSetTs(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		HashMap map = new HashMap();
		UserStatus s = EncInterceptorHelper.checkAppUserSignon(request);
		UserBean ub = s.getUserBean();
		if (ub == null) {
			map.put("status", "NO_LOGIN");
			map.put("errMsg", "");
		} else {
			try {
				String mapper = request.getParameter("id");
				User json = ub.getUser();
				json.setDfTsId(Long.parseLong(mapper));
				this.userDao.update(json);
				map.put("status", "OK");
				map.put("errMsg", "");
			} catch (Exception arg8) {
				map.put("status", "ERROR");
				map.put("errMsg", arg8.toString());
			}
		}

		response.setContentType("text/plain");
		response.setCharacterEncoding("utf-8");
		response.setHeader("Cache-Control", "no-cache");
		response.setHeader("Pragma", "no-cache");
		ObjectMapper mapper1 = new ObjectMapper();
		String json1 = mapper1.writeValueAsString(map);
		ServletOutputStream out = response.getOutputStream();
		out.write(json1.getBytes("utf-8"));
		out.flush();
		out.close();
		return null;
	}

	public ModelAndView handleAppSetBa(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		HashMap map = new HashMap();
		UserStatus s = EncInterceptorHelper.checkAppUserSignon(request);
		UserBean ub = s.getUserBean();
		if (ub == null) {
			map.put("status", "NO_LOGIN");
			map.put("errMsg", "");
		} else {
			try {
				String mapper = request.getParameter("id");
				User json = ub.getUser();
				json.setDfBaId(Long.parseLong(mapper));
				this.userDao.update(json);
				map.put("status", "OK");
				map.put("errMsg", "");
			} catch (Exception arg8) {
				map.put("status", "ERROR");
				map.put("errMsg", arg8.toString());
			}
		}

		response.setContentType("text/plain");
		response.setCharacterEncoding("utf-8");
		response.setHeader("Cache-Control", "no-cache");
		response.setHeader("Pragma", "no-cache");
		ObjectMapper mapper1 = new ObjectMapper();
		String json1 = mapper1.writeValueAsString(map);
		ServletOutputStream out = response.getOutputStream();
		out.write(json1.getBytes("utf-8"));
		out.flush();
		out.close();
		return null;
	}

	public ModelAndView handleAppLogin(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		HashMap map = new HashMap();
		String status = "";
		String errMsg = "";

		String json;
		try {
			EnterpriseInfo mapper = this.enterpriseInfoDao.get();
			EncCommonHelper.setEnterpriseInfo(request, mapper);
			EncLoginFormCtrHelper.parseLicenseInfo(request,
					this.getServletContext(), this.dataSource);
			json = request.getParameter("user_name");
			String out = request.getParameter("password");
			String sysCode = request.getParameter("sys_code");
			String appVerCode = request.getParameter("app_ver_code");
			if (json != null && !json.equals("")) {
				if (out != null && !out.equals("")) {
					if (sysCode != null
							&& sysCode.equals(EncCommonHelper
									.getProperty("sysCode"))
							&& appVerCode != null
							&& appVerCode.equals(EncCommonHelper
									.getProperty("appVerCode"))) {
						UserStatus s = PageHelper.doUserLogin(json, out, "APP",
								this.userDao, this.stafferDao, this.userPoDao,
								this.userPrivilegeDao, this.workCenterDao,
								this.tallySetDao, this.idGenerator, request);
						if (s.getAlertMsg().equals("")) {
							status = "OK";
							UserBean ub = EncCommonHelper
									.getCurrentUserAccount(request);
							map.put("ubid", ub.toString());
							map.put("stafId",
									String.valueOf(ub.getStaffer().getId()));
							map.put("stafName", ub.getStaffer()
									.getStafferName());
							map.put("userName", ub.getUser().getUserName());
							map.put("dfTsId",
									Long.valueOf(ub.getUser().getDfTsId()));
							map.put("dfBaId",
									Long.valueOf(ub.getUser().getDfBaId()));
							map.put("headImg", PageHelper.parseNull(ub
									.getStaffer().getHeadImage()));
						} else {
							status = "ERROR";
							errMsg = s.getAlertMsg();
						}
					} else {
						status = "SERV_CHAN";
						errMsg = "server change";
					}
				} else {
					status = "ERROR";
					errMsg = "请输入密码！";
				}
			} else {
				status = "ERROR";
				errMsg = "请输入帐号！";
			}
		} catch (Exception arg12) {
			status = "ERROR";
			errMsg = arg12.toString();
		}

		map.put("status", status);
		map.put("errMsg", errMsg);
		response.setContentType("text/plain");
		response.setCharacterEncoding("utf-8");
		response.setHeader("Cache-Control", "no-cache");
		response.setHeader("Pragma", "no-cache");
		ObjectMapper mapper1 = new ObjectMapper();
		json = mapper1.writeValueAsString(map);
		ServletOutputStream out1 = response.getOutputStream();
		out1.write(json.getBytes("utf-8"));
		out1.flush();
		out1.close();
		return null;
	}

	public ModelAndView handleAppPwdEdit(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		HashMap map = new HashMap();
		UserStatus s = EncInterceptorHelper.checkAppUserSignon(request);
		UserBean ub = s.getUserBean();
		String json;
		if (ub == null) {
			map.put("status", "NO_LOGIN");
			map.put("errMsg", "");
		} else {
			String mapper = request.getParameter("old_pwd");
			json = request.getParameter("fir_pwd");
			String out = request.getParameter("sec_pwd");
			String decPwd = "";
			User u = ub.getUser();

			try {
				decPwd = EncCommonHelper.decPwd(u.getPassword());
			} catch (Exception arg12) {
				;
			}

			try {
				if (!mapper.equals(decPwd)) {
					map.put("status", "ERROR");
					map.put("errMsg", "『原密码』不正确");
				} else if (!json.equals(out)) {
					map.put("status", "ERROR");
					map.put("errMsg", "『新密码第一次』与『新密码第二次』不一致");
				} else {
					u.setPassword(EncCommonHelper.encPwd(json));
					this.userDao.update(u);
					map.put("status", "OK");
					map.put("errMsg", "");
				}
			} catch (Exception arg11) {
				map.put("status", "ERROR");
				map.put("errMsg", arg11.toString());
			}
		}

		response.setContentType("text/plain");
		response.setCharacterEncoding("utf-8");
		response.setHeader("Cache-Control", "no-cache");
		response.setHeader("Pragma", "no-cache");
		ObjectMapper mapper1 = new ObjectMapper();
		json = mapper1.writeValueAsString(map);
		ServletOutputStream out1 = response.getOutputStream();
		out1.write(json.getBytes("utf-8"));
		out1.flush();
		out1.close();
		return null;
	}

	public ModelAndView handleAppSetHeadImg(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		HashMap map = new HashMap();
		UserStatus s = EncInterceptorHelper.checkAppUserSignon(request);
		UserBean ub = s.getUserBean();
		if (ub == null) {
			map.put("status", "NO_LOGIN");
			map.put("errMsg", "");
		} else {
			String mapper = request.getParameter("file_url");

			try {
				Staffer json = ub.getStaffer();
				json.setHeadImage(mapper);
				this.userDao.update(json);
				map.put("headImg", PageHelper.parseNull(json.getHeadImage()));
				map.put("status", "OK");
				map.put("errMsg", "");
			} catch (Exception arg8) {
				map.put("status", "ERROR");
				map.put("errMsg", arg8.toString());
			}
		}

		response.setContentType("text/plain");
		response.setCharacterEncoding("utf-8");
		response.setHeader("Cache-Control", "no-cache");
		response.setHeader("Pragma", "no-cache");
		ObjectMapper mapper1 = new ObjectMapper();
		String json1 = mapper1.writeValueAsString(map);
		ServletOutputStream out = response.getOutputStream();
		out.write(json1.getBytes("utf-8"));
		out.flush();
		out.close();
		return null;
	}

	public String getListView() {
		return this.listView;
	}

	public void setListView(String listView) {
		this.listView = listView;
	}

	public UserDao getUserDao() {
		return this.userDao;
	}

	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

	public String getMainView() {
		return this.mainView;
	}

	public void setMainView(String mainView) {
		this.mainView = mainView;
	}

	public String getOperateSuccessView() {
		return this.operateSuccessView;
	}

	public void setOperateSuccessView(String operateSuccessView) {
		this.operateSuccessView = operateSuccessView;
	}

	public PrivilegeDao getPrivilegeDao() {
		return this.privilegeDao;
	}

	public void setPrivilegeDao(PrivilegeDao privilegeDao) {
		this.privilegeDao = privilegeDao;
	}

	public String getPrivilegeListView() {
		return this.privilegeListView;
	}

	public void setPrivilegeListView(String privilegeListView) {
		this.privilegeListView = privilegeListView;
	}

	public String getListForMultiSelectView() {
		return this.listForMultiSelectView;
	}

	public void setListForMultiSelectView(String listForMultiSelectView) {
		this.listForMultiSelectView = listForMultiSelectView;
	}

	public UserPrivilegeDao getUserPrivilegeDao() {
		return this.userPrivilegeDao;
	}

	public void setUserPrivilegeDao(UserPrivilegeDao userPrivilegeDao) {
		this.userPrivilegeDao = userPrivilegeDao;
	}

	public IdGenerator getIdGenerator() {
		return this.idGenerator;
	}

	public void setIdGenerator(IdGenerator idGenerator) {
		this.idGenerator = idGenerator;
	}

	public TallySetDao getTallySetDao() {
		return this.tallySetDao;
	}

	public void setTallySetDao(TallySetDao tallySetDao) {
		this.tallySetDao = tallySetDao;
	}

	public void setWorkCenterDao(WorkCenterDao workCenterDao) {
		this.workCenterDao = workCenterDao;
	}

	public WorkCenterDao getWorkCenterDao() {
		return this.workCenterDao;
	}

	public StafferDao getStafferDao() {
		return this.stafferDao;
	}

	public void setStafferDao(StafferDao stafferDao) {
		this.stafferDao = stafferDao;
	}

	public EnterpriseInfoDao getEnterpriseInfoDao() {
		return this.enterpriseInfoDao;
	}

	public void setEnterpriseInfoDao(EnterpriseInfoDao enterpriseInfoDao) {
		this.enterpriseInfoDao = enterpriseInfoDao;
	}

	public DataSource getDataSource() {
		return this.dataSource;
	}

	public void setDataSource(DataSource dataSource) {
		this.dataSource = dataSource;
	}
}